import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '论文标题',
    align: "center",
    dataIndex: 'paperTitle'
  },
  {
    title: '论文作者',
    align: "center",
    dataIndex: 'paperAuthor'
  },
  {
    title: '论文领域类型',
    align: "center",
    dataIndex: 'paperFieldType_dictText'
  },
  {
    title: '论文图片',
    align: "center",
    dataIndex: 'imageurl',
    customRender: render.renderImage,
  },
  {
    title: '发表时间',
    align: "center",
    dataIndex: 'publicationTime',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },


  {
    title: '发布期刊',
    align: "center",
    dataIndex: 'journal'
  },
  {
    title: '卷号/期号',
    align: "center",
    dataIndex: 'vn'
  },
  {
    title: '页码  ',
    align: "center",
    dataIndex: 'pagination'
  },
  {
    title: 'DOI',
    align: "center",
    dataIndex: 'doi'
  },
  {
    title: '轮播图状态',
    align: "center",
    dataIndex: 'slider_dictText',
  },

];

// 高级查询数据
export const superQuerySchema = {
  paperTitle: {title: '论文标题',order: 0,view: 'text', type: 'string',},
  paperAuthor: {title: '论文作者',order: 1,view: 'text', type: 'string',},
  paperFieldType: {title: '论文领域类型',order: 2,view: 'list', type: 'string',dictCode: 'papers_type',},
  imageurl: {title: '论文图片',order: 3,view: 'image', type: 'string',},
  paperAbstract: {title: '论文摘要',order: 4,view: 'textarea', type: 'string',},
  paperIntroduction: {title: '论文简介',order: 5,view: 'umeditor', type: 'string',},
  publicationTime: {title: '发表时间',order: 6,view: 'date', type: 'string',},
};
